AddHiliteSample
TheAddHiliteSample
function provides dynamic highlighting of text.
pascal ComponentResult AddHiliteSample (MediaHandler mh, short hiliteStart, short hiliteEnd, RGBColor *rgbHiliteColor, TimeValue duration, TimeValue *sampleTime)
mh
- Specifies the media handler for the text media obtained by the
GetMediaHandler
function.hiliteStart
Indicates the beginnning of the text to be highlighted.hiliteEnd
- Indicates the ending of the text to be highlighted. If the value of the
hiliteStart
parameter equals that of thehiliteEnd
parameter, then no text is highlighted (that is, highlighting is turned off for the duration of the specified sample).rgbHiliteColor
- Contains a pointer to the RGB color for highlighting. If this parameter is not
nil
, then the specified color is used when highlighting the text indicated by thehiliteStart
andhiliteEnd
parameters. Otherwise, the default system highlight color is used.duration
- Specifies how long the text sample should last. This duration is expressed in the media's time base.
sampleTime
Contains a pointer to aTimeValue
structure. The actual media time at which the sample was added is returned here.DESCRIPTION
TheAddHiliteSample
function essentially extends the duration of the text that has just been added, using the highlighting indicated by thehiliteStart
andhiliteEnd
parameters. You must call theAddHiliteSample
function after callingAddTextSample
orAddTESample
. SinceAddHiliteSample
uses the concept of difference frames, the highlighted samples must immediately follow their associated text samples.ERROR CODES
File Manager errors
invalidMedia -2008 This media is corrupted or invalid
Memory Manager errors